import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useInputBoxStore = defineStore('inputBox', () => {
  const inputValue = ref<any>(1)

  const setInputValue = (val: any) => {
    inputValue.value = val
  }

  const saveToLocalStorage = () => {
    localStorage.setItem('inputValue', inputValue.value)
  }

  return {
    inputValue,
    setInputValue,
    saveToLocalStorage
  }
})
